package com.jiangxiaofei.citycloud.adapter;

import android.graphics.Color;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiangxiaofei.citycloud.R;
import com.jiangxiaofei.citycloud.bean.FleaMenuBean;

import java.util.List;

/**
 * @author: JiangXFei
 * @date: 2017/11/14 0014
 * @content:
 */

public class FleaRecyTypeAdapter extends BaseQuickAdapter<FleaMenuBean, BaseViewHolder> {
    public FleaRecyTypeAdapter(int layoutResId, @Nullable List<FleaMenuBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FleaMenuBean item) {
        helper.setText(R.id.tv_type, item.getName());
        if (item.isChecked()) {
            helper.setTextColor(R.id.tv_type, Color.parseColor("#66caff"));
        } else {
            helper.setTextColor(R.id.tv_type, Color.parseColor("#7B7B7B"));
        }
    }
}
